package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.markup_condition_level;
import com.ymttest.database.model.godmch.markup_condition_levelExample;
import com.ymttest.database.model.godmch.markup_condition_levelKey;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface markup_condition_levelMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_condition_level
     *
     * @mbggenerated Tue Jul 07 10:42:11 CST 2020
     */
    @SelectProvider(type=markup_condition_levelSqlProvider.class, method="countByExample")
    int countByExample(markup_condition_levelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_condition_level
     *
     * @mbggenerated Tue Jul 07 10:42:11 CST 2020
     */
    @DeleteProvider(type=markup_condition_levelSqlProvider.class, method="deleteByExample")
    int deleteByExample(markup_condition_levelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_condition_level
     *
     * @mbggenerated Tue Jul 07 10:42:11 CST 2020
     */
    @Delete({
        "delete from markup_condition_level",
        "where agent_id = #{agent_id,jdbcType=INTEGER}",
          "and supplier_id = #{supplier_id,jdbcType=INTEGER}",
          "and type_id = #{type_id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(markup_condition_levelKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_condition_level
     *
     * @mbggenerated Tue Jul 07 10:42:11 CST 2020
     */
    @Insert({
        "insert into markup_condition_level (agent_id, supplier_id, ",
        "type_id, type_level, ",
        "createTime, updateTime)",
        "values (#{agent_id,jdbcType=INTEGER}, #{supplier_id,jdbcType=INTEGER}, ",
        "#{type_id,jdbcType=INTEGER}, #{type_level,jdbcType=INTEGER}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(markup_condition_level record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_condition_level
     *
     * @mbggenerated Tue Jul 07 10:42:11 CST 2020
     */
    @InsertProvider(type=markup_condition_levelSqlProvider.class, method="insertSelective")
    int insertSelective(markup_condition_level record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_condition_level
     *
     * @mbggenerated Tue Jul 07 10:42:11 CST 2020
     */
    @SelectProvider(type=markup_condition_levelSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="agent_id", property="agent_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="supplier_id", property="supplier_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type_id", property="type_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type_level", property="type_level", jdbcType=JdbcType.INTEGER),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<markup_condition_level> selectByExample(markup_condition_levelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_condition_level
     *
     * @mbggenerated Tue Jul 07 10:42:11 CST 2020
     */
    @Select({
        "select",
        "agent_id, supplier_id, type_id, type_level, createTime, updateTime",
        "from markup_condition_level",
        "where agent_id = #{agent_id,jdbcType=INTEGER}",
          "and supplier_id = #{supplier_id,jdbcType=INTEGER}",
          "and type_id = #{type_id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="agent_id", property="agent_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="supplier_id", property="supplier_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type_id", property="type_id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="type_level", property="type_level", jdbcType=JdbcType.INTEGER),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    markup_condition_level selectByPrimaryKey(markup_condition_levelKey key);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_condition_level
     *
     * @mbggenerated Tue Jul 07 10:42:11 CST 2020
     */
    @UpdateProvider(type=markup_condition_levelSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") markup_condition_level record, @Param("example") markup_condition_levelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_condition_level
     *
     * @mbggenerated Tue Jul 07 10:42:11 CST 2020
     */
    @UpdateProvider(type=markup_condition_levelSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") markup_condition_level record, @Param("example") markup_condition_levelExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_condition_level
     *
     * @mbggenerated Tue Jul 07 10:42:11 CST 2020
     */
    @UpdateProvider(type=markup_condition_levelSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(markup_condition_level record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table markup_condition_level
     *
     * @mbggenerated Tue Jul 07 10:42:11 CST 2020
     */
    @Update({
        "update markup_condition_level",
        "set type_level = #{type_level,jdbcType=INTEGER},",
          "createTime = #{createTime,jdbcType=TIMESTAMP},",
          "updateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where agent_id = #{agent_id,jdbcType=INTEGER}",
          "and supplier_id = #{supplier_id,jdbcType=INTEGER}",
          "and type_id = #{type_id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(markup_condition_level record);
}